#include<iostream>
using namespace std;
int main()
{
	int n;
	for (int i = 0; i < n; i++) {
		int a, b, c;
		cin >> a >> b >> c;
		int k = 1;
		while (k <= c) {
			w[++cnt] = k * a;
			v[cnt] = k * b;
			c -= k;
			k *= 2;
		}
		if (c) {
			w[++cnt] = c * a;
			v[cnt] = c * b;
		}
	}
	return 0;
}